package com.zzuli.fitness.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzuli.fitness.entity.SysNotice;
import com.zzuli.fitness.mapper.SysNoticeDao;
import com.zzuli.fitness.service.SysNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("sysNoticeService")
public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeDao, SysNotice> implements SysNoticeService {
    @Autowired
    private SysNoticeDao sysNoticeDao;

    @Override
    public SysNotice selectNewsById(Integer id) {
        return sysNoticeDao.selectByPrimaryKey(id);
    }

    @Override
    public List<SysNotice> selectAll() {
        return sysNoticeDao.selectAllNews();
    }
}
